/*
 * Copyright 2020 The Kubernetes Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

@import '../Terminal/mixins';

@mixin sidecar-maximized-no-user {
  .toggle-sidecar-maximization-button {
    display: none;
  }
}

@mixin Sidecar {
  .kui--sidecar {
    @content;
  }
}

@mixin SidecarTopTabs {
  .kui--sidecar-tabs {
    @content;
  }
}

@mixin SidecarTopTab {
  .kui--sidecar-tab {
    @content;
  }
}

@mixin SidecarTopTabSelectedBorder {
  @include SidecarTopTab {
    button[data-is-selected]:after {
      @content;
    }
  }
}

@mixin SidecarTopTabLabel {
  .kui--sidecar-tab-label {
    @content;
  }
}

@mixin NestedSidecar {
  .kui--sidecar-nested {
    @content;
  }
}

@mixin NestedTopNav {
  @include NestedSidecar {
    &[data-view='topnav'] {
      @content;
    }
  }
}

@mixin NestedLeftNav {
  @include NestedSidecar {
    &[data-view='leftnav'] {
      @content;
    }
  }
}

@mixin NestedLeftNavWidthConstrained {
  @include WidthConstrained {
    @include NestedLeftNav {
      @content;
    }
  }
}

@mixin NotMaximized {
  &:not(.maximized) {
    @content;
  }
}

@mixin Maximized {
  &.maximized {
    @content;
  }
}

@mixin SidecarTitleBar {
  .sidecar-bottom-stripe {
    @content;
  }
}

@mixin SidecarTitleBarButtons {
  .sidecar-window-buttons {
    @content;
  }
}

@mixin SidecarToolbarButton {
  .sidecar-bottom-stripe-button {
    @content;
  }
}

@mixin SidecarBottomToolbar {
  .sidecar-toolbar-text[data-location-bottom],
  .sidecar-bottom-stripe-button-container.sidecar-bottom-stripe-mode-bits[data-location-bottom] {
    @content;
  }
}
